package com.example.xpvideo.Controller;

import com.example.xpvideo.entity.BusinessDistrict;
import com.example.xpvideo.entity.PageResult;
import com.example.xpvideo.entity.ResponseResult;
import com.example.xpvideo.entity.req.PHPCommodityReq;
import com.example.xpvideo.entity.res.PHPCommodityRes;
import com.example.xpvideo.service.BusinessDistrictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

/**
 * @author : 洪俊新
 * @date : 2021/9/8 10:46
 * @description:
 */
@RestController
@RequestMapping("/back/business")
public class PhpBusinessController {
    @Autowired
    private BusinessDistrictService businessDistrictService;

    /**
     * 首页商品列表
     * */
    @GetMapping("/list")
    public ResponseResult<PageResult<List<BusinessDistrict>>> list()
            throws Exception{
        return businessDistrictService.list();
    }
}
